#define  _CRT_SECURE_NO_WARNINGS 1

#include<vector>
#include"RBTree.h"

void test1()
{
	int arr[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };
	RBTree<int, int> rbt;
	for (auto e : arr)
	{
		rbt.insert(make_pair(e, e));
		cout << rbt.IsBalance() << endl;
	}
}

void test2()
{
	const int n = 10;
	vector<int> v;
	v.reserve(n);
	srand(time(0));

	for (size_t i = 0;i < n;i++)
	{
		v.push_back(rand());
	}

	RBTree<int, int> rbt;
	for (auto e : v)
	{
		rbt.insert(make_pair(e, e));
		cout << rbt.IsBalance() << endl;
	}
}

int main()
{
	test2();

	return 0;
}